<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateGuildBalanceDaily extends Migration
{
    protected $connection = 'guild';

    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('guild_balance_daily', function (Blueprint $table) {
            $table->increments('id');
            $table->date('dt')->comment('统计日期');
            $table->integer('guild_manage_id')->default(0)->comment('内部公会id');
            $table->decimal('have_access_balance', 20)->default(0)->comment('当日解锁的可提现金额');
            $table->decimal('audit_access_balance', 20)->default(0)->comment('当日冻结的金额');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('guild_balance_daily');
    }
}
